import Cookies from 'js-cookie'

const TokenKey = 'hrsaas-token-key'
// 获取token
export function getTokenInfo() {
  return Cookies.get(TokenKey)
  // localStorage.getItem('xx')
}
// 设置token
export function setTokenInfo(token) {
  return Cookies.set(TokenKey, token)
  // localStorage.setItem('k',v )
}
// 移除token
export function removeTokenInfo() {
  return Cookies.remove(TokenKey)
  // localStorage.removeItem(k)
}

const ThemeKey = 'hrsaas-theme'
// 获取主题色
export function getThemeInfo() {
  return Cookies.get(ThemeKey)
  // localStorage.getItem('xx')
}
// 设置主题色
export function setThemeInfo(newTheme) {
  return Cookies.set(ThemeKey, newTheme)
  // localStorage.setItem('k',v )
}
// 移除主题色
export function removeThemeInfo() {
  return Cookies.remove(ThemeKey)
  // localStorage.removeItem(k)
}
